package happy;

import com.google.common.collect.Lists;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @description: 五子棋比赛表
 * @author: kanggw
 * @date: 2023/1/20
 **/
public class FiveChess {

    public static void main(String[] args) {
        List<String> people = Lists.newArrayList(
                "雷雷", "大庆", "云起雾都", "Serendipity", "dash","我与神明画押");
        List<String> result = Lists.newArrayList();

        for (int i = 0; i < people.size(); i++) {
            String name = people.get(i);
            for (int j = i + 1; j < people.size(); j++) {
                result.add(name + " VS " + people.get(j));
            }
        }

        Collections.shuffle(result);
        System.out.println("五子棋争霸赛赛程表");
        System.out.println("-----------------------------");
        result.stream().forEach(sort-> {
            System.out.println(sort);
        });
        System.out.println("争霸赛参与人数:"+people.size() + ", 每人"+ (people.size()-1) + "局,共"+result.size() + "局;");
    }

}
